package com.xjlsoft.weather.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;

import lombok.Getter;


public enum GradeEnum {

    PRIMARY(1, "小学"),
    SECONDORY(2, "中学"),
    HIGH(3, "高中");

    GradeEnum(int code, String descp) {
        this.code = code;
        this.descp = descp;
    }

    @EnumValue
  	@JsonValue	
    private final int code;
    
    private final String descp;
    
    @Override//一定要重写toString()
	public String toString() {
    	/*System.out.println(GradeEnum);
    	System.out.println(this.code+" ===="+this.descp);
    	return "tdddddd";*/
		return this.descp;
	}
    
    public int getCode() {
        return code;
    }

    public String getDescp() {
        return descp;
    }
    

}